package shovelsoft.btmetaparser.structs;

import java.util.List;

import shovelsoft.btmetaparser.tokens.IToken;

/***
 * Node interface for our parse tree
 * @author Chris Stones
 */
public interface INode {

	/***
	 * Get the token associated with this node ( Data/Integer/List/Dictionary/End )
	 * @return Associated token
	 */
	public IToken getToken();
	
	/***
	 * Get this nodes parent ( null for root )
	 * @return parent node.
	 */
	public INode getParent();
	
	/***
	 * Get this nodes child list ( valid for List/Dictionary nodes )
	 * @return list of childen
	 */
	public List<INode> getChildren();
	
	/***
	 * add a child to this node ( valid for List/Dictionary nodes )
	 * @param child
	 * @throws Exception
	 */
	public void addChild(INode child) throws Exception;
}

